package edu.FeignConfig;

import feign.Contract;
import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by JPhoebe on 2017/7/7.
 */

/**
 * 改配置文件可以针对某个服务进行管理验证
 */
@Configuration
public class UserFeignConfig {

//    @Bean
//    public Contract feignContract(){
//        return new feign.Contract.Default();
//    }

    @Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor(){
        return new BasicAuthRequestInterceptor("user","password");
    }

}
